/**
 * Created by DELL on 2017/6/13.
 */

var lockId=common.getQueryString("lockId");
$("#lockId").val(lockId);
var userInfo=common.getLocalData(common.agentSysCacheWord).user;
$("#userId").val(userInfo.id);
/**
 * 中介联系人 列表初始化设置
 * @type {Object}
 */
var settings = {
    "sAjaxSource": window.globalHost + common.lockRecordListPath,
    "aoColumns": [
       {
            "mDataProp": function(obj) {
                return obj.contractNo?obj.contractNo:"无编号";
                // return "<a href='../submenu.html?key=lockRecord&id=" + obj.id + "'>" + (obj.contractNo?obj.contractNo:"无编号") + "</a>";
            },
            "sTitle": "房源合同编号",
            "sDefaultContent": "",
            "sClass": "center"
       },{
            "mDataProp": function(obj) {
                return (!!obj.villageName?obj.villageName:"无信息")+"<br/>"+(obj.houseAddress?obj.houseAddress:"无信息");
            },
            "sTitle": "小区/房源地址",
            "sDefaultContent": ""
       },{
            "mDataProp": function(obj) {
                return (!!obj.userName?obj.userName:"无信息")+"<br/>"+(!!obj.mobile?obj.mobile:"无信息");
            },
            "sTitle": "开锁人/开锁人电话",
            "sDefaultContent": ""
       },{
            "mDataProp": "createTime",
            "sTitle": "开锁时间",
            "sDefaultContent": ""
       },{
            "mDataProp": function(obj) {
                return obj.isSuccess==1?"开锁成功":"开锁失败";
            },
            "sTitle": "开锁结果",
            "sDefaultContent": ""
        }],
    "fnServerParams": function(aoData) {
        return common.getSearchData("form.data-list-search",aoData);
    }
};
var options = $.extend(true, {}, _dataTableSettings, settings);
/**
 * 实例化 中介联系人 列表插件
 * @type {[type]}
 */
var $currentDataTable=$("#data-list");
var oTable = $currentDataTable.dataTable(options);
searchList.getDataList(oTable);
searchList.resetSearch(oTable);
